<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>商品销售报表</title>
<style type="text/css">
<!--
.STYLE1 {
	color: #FF0000;
	font-weight: bold;
}
.STYLE2 {color: #FF0000}
-->
</style>
<body class="withvernav">
<style type="text/css">
	thead tr td{
		vertical-align: middle;background-color: #CCCCCC; border: 1px solid #000000 !important ; text-align: center;
	}
	.stdtable tbody tr td {padding:3px 0px !important;font-size:12px !important;}
</style>
<div class="bodywrapper"> {{include file='/public/leftmenu.tpl'}}
  <div class="centercontent">
    <div class="pageheader notab">
      <h1 class="pagetitle">FBA商品销售报表</h1>
     
</div>
<!--pageheader-->
    
    <div id="contentwrapper" class="contentwrapper" >
      <div id="basicform" class="subcontent">
          <!--搜索栏-->
           
    <form class="stdform stdform2" method="get" action="/report/fbaGoodsRank">
      <div class="tableoptions">
      开始时间：
       <input type="text"  name="starttime" value="{{$starttime}}" onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" /> - <input type="text"  name="endtime" value="{{$endtime}}" onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" />
       <span style="display:none">所属平台: 
     <select id="platform" name="platform">
            <option value="">-请选择-</option>
            <option value="ebay">ebay</option>
            <option value="Amazon">Amazon</option>
            <option value="1号店">1号店</option>
            <option value="淘宝">淘宝</option>
            <option value="Tmall">Tmall</option>
            <option value="ioffer">ioffer</option>
        </select>
       &nbsp;</span>&nbsp; <span id="search_list">{{$shopname|getstr:35}}</span>
<input name="shopname" id="shopname" type="hidden" value="{{$shopname}}" />
<span id="choose_shop_btn" style="border:1px solid #ccc;padding:6px 5px 7px;border-radius:3px;cursor:pointer;" onClick="getShopList()">选择店铺 <img src="/fuman/images/search_down.png" width="14" height="21" align="absmiddle" style="margin-bottom:-4px;"></span>
&nbsp;SKU：<input type="text" name="skunumber" id="skunumber" value="{{$skunumber}}" class="width100">&nbsp;
       排序方式：
       <select name="ordertype">
<option value="sell_total" {{if $ordertype=='sell_total'}} selected{{/if}}>销售数量</option>
<option value="goods_amount_total" {{if $ordertype=='goods_amount_total'}} selected{{/if}}>交易金额</option>
<option value="productid" {{if $ordertype=='productid'}} selected{{/if}}>商品编号</option>
</select>   显示条数：
<input type="text"  name="rownum" value="{{$rownum}}"  class="width100">&nbsp; 
        <button class="btn btn_orange btn_search radius50">Search</button>
         &nbsp;&nbsp;
    {{if $list[0] neq  ''}}
        <span class="page" style="border:none;"><a href="javascript:exportExl();">导出结果到Excel</a></span>
    {{/if}} 总记录数：<strong style="color:red;">{{$total_datas}}</strong>条
</div>
    </form>
    <!--搜索栏结束-->

             <table cellpadding="0" cellspacing="0" border="0" class="stdtable" width="1600">
          
            <thead>
              <tr valign="top" class="tableheader">
      <td width="90"><b>商品编号</b></td>
      <td><b>名称</b></td>
      <td width="100" align="center"><b>收款金额(RMB)</b>        </td>
      <td width="80" align="center"><b>商品成本</b>        </td>
      <td width="80" align="center"><strong>FBA费用</strong></td>
      <td width="80" align="center"><strong>头程</strong>(RMB)</td>
      <td  width="50"><b>利润</b></td>
      <td><b>利润率(%)</b></td>
      <td><b>销售数量</b></td>
      <td><b>平均单天销量</b></td>
      </tr>
            </thead>
          
             {{foreach from=$list item=res key=key}}
             <tr>
              <td class="head1" align="center"><a href="/product/editProduct?goods_id={{$res.goods_id}}" target="_blank">{{$res.productid}}</a></td>
               <td class="head0" align="center" title="{{$res.goods_name}}">{{$res.goods_name|getstr:24:0}}</td>
              <td class="head1" align="center" style="border-left:1px solid #000;">{{$res.goods_amount_total}}</td>
                <td class="head1" align="center" style="border-left:1px solid #000;">{{$res.costprice_total}}</td>
                <td class="head1" align="center" style="border-left:1px solid #000;">{{$res.payship_fee_total}}</td>
                <td class="head1" align="center" style="border-left:1px solid #000;">{{$res.firstshipment_fre}}</td>
               <td class="head0" align="center" style="border-left:1px solid #000;">
                {{$res.lirun}}</td>
               <td class="head0" align="center">{{$res.maoliv}}%</td>
                <td class="head1" align="center">{{$res.sell_total}}</td>
                <td class="head1" align="center">{{$res.day_sales}}</td>
               </tr>
            {{/foreach}}
             <tr>
               <td align="center" class="head1"><strong>合计：</strong></td>
               <td align="center" class="head0" title="{{$res.goods_name}}">&nbsp;</td>
               <td align="center" class="head1"><span class="STYLE1">{{$data_total.goods_amount_total}}</span></td>
               <td align="center" class="head1" ><span class="STYLE1">{{$data_total.costprice_total}}</span></td>
               <td align="center" class="STYLE1" ><span class="STYLE1">{{$data_total.ship_fba_pay}}</span></td>
               <td align="center" class="STYLE1" ><span class="STYLE1">{{$data_total.firstshipment_fre}}</span></td>
               <td align="center" class="head0"><span class="STYLE1">{{$data_total.maoli_total}}</span></td>
               <td align="center" class="head0 STYLE2"><span class="STYLE1">{{$data_total.all_lirunlv}}%</span></td>
               <td align="center" class="head1"><span class="STYLE2"><strong>{{$data_total.sell_total}}</strong></span></td>
               <td align="center" class="head1"><span class="STYLE2"><strong>{{$data_total.day_sales}}</strong></span></td>
             </tr>
          </table>
      </div></div>
<div style="position:absolute;z-index:999;top:105px;border:1px solid #666;left:220px;width:870px;background:#f5f5f5;padding:6px 10px;height:450px;margin-bottom:40px;display:none;" id="ajax_box">
<div style="padding-top:8px;padding-left:12px;height:28px;"><h4 style="float:left">选择要搜索的店铺</h4><span style="float:right">
  <input type="button" name="button" id="button" onClick="setShopInfo()" value="确定选择">&nbsp;&nbsp;
  <input type="button" value="关闭弹层" onClick="closeShowBox()">
</span></div>
<hr>
<div id="shop_box" style="height:400px;overflow:auto"></div>
</div>
<script type="text/javascript" src="/fuman/js/report.js"></script>
</body>
</html>